#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int fact(int n, int result)
{
	if (n == 1)
		return result;
	else
		return fact(n - 1, n * result);
}

int main()
{
	int n = 0;
	int result = 1;
	scanf("%d", &n);
	printf("%d\n", fact(n, result));
	return 0;
}